package com.chexiang360.controller;

import com.chexiang360.dto.Result;
import com.chexiang360.model.GoodsModel;
import com.chexiang360.service.GoodsService;
import com.chexiang360.util.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Watler
 * @apiNote 搜索
 */
@RestController
public class GoodsController {

    @Autowired
    GoodsService goodsService;

    @PostMapping("/goodsList")
    public Result<PageUtil<GoodsModel>> goodsList(String currPage, String pageSize){

        Map<String, Object> map = new HashMap<String, Object>();

        PageUtil<GoodsModel> pu = new PageUtil<GoodsModel>(currPage, pageSize);
        goodsService.goodsList(pu , map);
        return null;
    }


}
